#ifndef MYCHART_H
#define MYCHART_H

#include <QWidget>
#include <QtCharts>
#include <QtCharts/QChartView>

class MyChart : public QChartView
{
    Q_OBJECT
public:
    explicit MyChart(QWidget *parent = nullptr);

    void addSeres(QLineSeries series, QString seriesName = "line");
    void addSeres(QList<QPointF> dotList, QString seriesName = "line");
    void setChartTitle(QString title);
    void clearSeries();
    void removeSeries(QLineSeries *series);
signals:

public slots:

private:
    QChart *mChart;

    QList<QAbstractSeries *> getSeries();
    QMap<QLineSeries *,QString> seriesNameMap;
};


#endif // MYCHART_H
